import java.util.LinkedList;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: yinsh
 * Date: 2025-01-21
 * Time: 21:57
 */
public class MyStack<T> {
   LinkedList<Integer> linkedList = new LinkedList();
    LinkedList head = null;

    public void push(int data) {
        linkedList.addFirst(data);
    }
    public void pop() {
        linkedList.remove();
    }
    public int peek() {
        return linkedList.getFirst();
    }
    public boolean empty() {
        return linkedList.isEmpty();

    }
}
